package com.jihox.abookpro.domain;

import java.io.Serializable;

public class Caption implements Serializable{

	public static final int ALIGN_LEFT = 0;
	public static final int ALIGN_CENTER = 1;
	public static final int ALIGN_RIGHT = 2;
	public static final int ALIGN_JUSTIFIED = 3;

	public static final int UNDEFINED 	= 0;
	public static final int PORTRAIT 		= 1;
	public static final int LANDSCAPE 	= 2;
	public static final int SQUARE 			= 3;
	
	private String text = "";
	private String tempText ="";
	private boolean showTempText= false;
	private int rotation = 0;
	protected float x = 0;
	protected float y = 0;
	protected float height = 0;
	protected float width = 0;
	private Integer layerIndex = 0;
	private Font font = new Font("Sanserif", Font.PLAIN, 24);
	private int docAlign = ALIGN_CENTER;
    private Color color = new Color(255,255,255);
    //private int type = UNDEFINED;
    private int maxLength =0;
    private boolean isLocked =true;
    private boolean isEditable =false;
    private float marginTop =-1;
	
	public float getMarginTop() {
		return marginTop;
	}

	public void setMarginTop(float marginTop) {
		this.marginTop = marginTop;
	}

	public boolean isShowTempText() {
		return showTempText;
	}

	public void setShowTempText(boolean showTempText) {
		this.showTempText = showTempText;
	}

    public String getTempText() {
		return tempText;
	}

	public void setTempText(String tempText) {
		this.tempText = tempText;
	}
	
    public boolean isEditable() {
		return isEditable;
	}

	public void setEditable(boolean isEditable) {
		this.isEditable = isEditable;
	}

	public int getMaxLength() {
		return maxLength;
	}

	public void setMaxLength(int maxLength) {
		this.maxLength = maxLength;
	}

	public String getPlaceHolder() {
		return placeHolder;
	}

	public void setPlaceHolder(String placeHolder) {
		this.placeHolder = placeHolder;
	}

	private String placeHolder ="";
    
//	public int getType() {
//		return type;
//	}
//
//	public void setType(int type) {
//		this.type = type;
//	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public Caption() {
	}

	public Font getFont() {
		return font;
	}

	public void setFont(Font font) {
		this.font = font;
	}
	
	public int getDocAlign() {
		return docAlign;
	}

	public void setDocAlign(int docAlign) {
		this.docAlign = docAlign;
	}
	
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public int getRotation() {
		return rotation;
	}

	public void setRotation(int rotation) {
		this.rotation = rotation;
	}

	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

	public float getHeight() {
		return height;
	}

	public void setHeight(float height) {
		this.height = height;
	}

	public float getWidth() {
		return width;
	}

	public void setWidth(float width) {
		this.width = width;
	}

	public Integer getLayer() {
		return layerIndex;
	}

	public void setLayer(Integer layer) {
		this.layerIndex = layer;
	}

}
